home *** CD-ROM | disk | FTP | other *** search
/ HiJaak Graphics Suite 3.0 / HiJaak Graphics Suite V3.iso / inset / fills.pdp < prev    next >
Text File  |  1992-11-14  |  41KB  |  1,720 lines

  1. %Original:      Mark Jaremko            1991 Jan
  2. %Appended:      Brent Williams          1992 June
  3.  
  4.  
  5. %GSFill:Bubble,Bubbles 1
  6. %@Param:Density,integer,50
  7. %@Param:Max Radius,points,10
  8. %@Param:Min Radius,points,1
  9. %@Param:Max Line Width,points,1
  10. %@Param:Min Line Width,points,.24
  11. %@Param:Background Shade,percent,0,100,15
  12. %@Param:Foregrnd Max Shade,percent,0,100,0
  13. %@Param:Foregrnd Min Shade,percent,0,100,100
  14. %@Param:Random Seed,real,0,1,0
  15.  
  16. %!    Rev 2 - June 17, 1992 -changed by Arno Krautter to account for
  17. %!            printer resolution [resX, resY] because Windows outputs
  18. %!            resolution dependent coords
  19.  
  20. /Bubble
  21.    {
  22.      srand                  % RandomSeed
  23.      /FSMin exch def            % ForeShadeMin
  24.      1.0 exch sub /FSMax exch def        % ForeShadeMax
  25.      1.0 exch sub /BackS exch def        % Backshade
  26.      /MinWid exch def       % MinWidth
  27.      /MaxWid exch def       % MaxWidth
  28.      /MinRad exch def       % MinSpace
  29.      /MaxRad exch def       % MaxSpace
  30.      /Den exch def      % Frequency
  31.      /Ht exch def              % y dimension
  32.      /Wid exch def             % x dimension
  33.      /CenY exch def         % CentY
  34.      /CenX exch def     % CentX
  35.  
  36.       eoclip
  37.       newpath
  38.  
  39.       /RndMax 2147483647 def
  40.       /RadRange MaxRad MinRad sub def
  41.       /WidRange MaxWid MinWid sub def
  42.       /GrayRange FSMax FSMin sub def
  43.       /RD {
  44.        rand RndMax div 100 mul round 100 div
  45.         } bind def  % Round to 2 places
  46.  
  47.       CenX CenY translate       % centre of bound
  48.  
  49.       % Make Background box
  50.       Wid 2 div neg Ht 2 div neg moveto
  51.       0 Ht rlineto
  52.       Wid 0 rlineto
  53.       0 Ht neg rlineto
  54.       closepath
  55.       BackS setgray
  56.       fill
  57.  
  58.       Ht Wid mul Den mul resX div resY div cvi
  59.  
  60.       { RD Wid mul Wid 2 div sub
  61.         RD Ht mul Ht 2 div sub
  62.     RD WidRange mul MinWid add setlinewidth
  63.     RD GrayRange mul FSMin add setgray
  64.     RD RadRange mul MinRad add
  65.     0 360 arc
  66.     gsave
  67.         fill
  68.     grestore
  69.     0 setgray
  70.     stroke
  71.       }
  72.     repeat
  73.  
  74. } bind def
  75.  
  76. %GSEndFill
  77.  
  78.  
  79.  
  80.  
  81. %GSFill:Bubble2,Bubbles 2
  82. %@Param:Density,integer,50
  83. %@Param:Max Radius,points,40
  84. %@Param:Min Radius,points,10
  85. %@Param:Max Line Width,points,3
  86. %@Param:Min Line Width,points,.24
  87. %@Param:Background Shade,percent,0,100,50
  88. %@Param:Foregrnd Max Shade,percent,0,100,0
  89. %@Param:Foregrnd Min Shade,percent,0,100,100
  90. %@Param:Random Seed,real,0,1,0
  91.  
  92. %!    Rev 2 - June 17, 1992 -changed by Arno Krautter to account for
  93. %!            printer resolution [resX, resY] because Windows outputs
  94. %!            resolution dependent coords
  95.  
  96. /Bubble2
  97.    {
  98.      srand                  % RandomSeed
  99.      1.0 exch sub /FSMin exch def            % ForeShadeMin
  100.      1.0 exch sub /FSMax exch def        % ForeShadeMax
  101.      1.0 exch sub /BackS exch def        % Backshade
  102.      /MinWid exch def       % MinWidth
  103.      /MaxWid exch def       % MaxWidth
  104.      /MinRad exch def       % MinSpace
  105.      /MaxRad exch def       % MaxSpace
  106.      /Den exch def      % Frequency
  107.      /Ht exch def              % y dimension
  108.      /Wid exch def             % x dimension
  109.      /CenY exch def         % CentY
  110.      /CenX exch def     % CentX
  111.  
  112.       eoclip
  113.       newpath
  114.  
  115.       /RndMax 2147483647 def
  116.       /RadRange MaxRad MinRad sub def
  117.       /WidRange MaxWid MinWid sub def
  118.       /GrayRange FSMax FSMin sub def
  119.       /RD {
  120.        rand RndMax div 100 mul round 100 div
  121.         } bind def  % Round to 2 places
  122.  
  123.       CenX CenY translate       % centre of bound
  124.  
  125.       % Make Background box
  126.       Wid 2 div neg Ht 2 div neg moveto
  127.       0 Ht rlineto
  128.       Wid 0 rlineto
  129.       0 Ht neg rlineto
  130.       closepath
  131.       BackS setgray
  132.       fill
  133.  
  134.       Ht Wid mul Den mul resX div resY div cvi
  135.  
  136.       { RD Wid mul Wid 2 div sub
  137.         RD Ht mul Ht 2 div sub
  138.     RD WidRange mul MinWid add setlinewidth
  139.     RD GrayRange mul FSMin add setgray
  140.     RD RadRange mul MinRad add
  141.     0 360 arc
  142.     gsave
  143.         fill
  144.     grestore
  145.     0 setgray
  146.     stroke
  147.       }
  148.     repeat
  149.  
  150. } bind def
  151.  
  152. %GSEndFill
  153.  
  154.  
  155.  
  156.  
  157. %GSFill:Fibres,Fibres
  158. %@Param:Max Space,points,15
  159. %@Param:Min Space,points,5
  160. %@Param:Max Line Width,points,4.24
  161. %@Param:Min Line Width,points,.24
  162. %@Param:Angle,angle,-360,360,90
  163. %@Param:Background Shade,percent,0,100,0
  164. %@Param:Foregrnd Shade Max,percent,0,100,100
  165. %@Param:Foregrnd Shade Min,percent,0,100,100
  166. %@Param:Amplitude,real,2
  167. %@Param:Cycles,integer,55
  168. %@Param:Random Seed,real,0,1,0
  169.  
  170.  
  171. %!    Fibers1
  172. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  173. %!    Rev 2 - Jan. 17
  174. %!    This is a marginally slow routine.
  175. %!    Rev 3 - June 17, 1992 -changed by Arno Krautter to account for
  176. %!            printer resolution [resX, resY] because Windows outputs
  177. %!            resolution dependent coords
  178.  
  179. /Fibres
  180.    {
  181.      srand                  % RandomSeed
  182.      resX mul 300 div /Cyc exch def      % Cycles
  183.      /Amp exch def      % Amplitude
  184.      1.0 exch sub /FSMin exch def            % ForeShadeMin
  185.      1.0 exch sub /FSMax exch def        % ForeShadeMax
  186.      1.0 exch sub /BackS exch def        % Backshade
  187.      /Rot exch def      % Angle
  188.      /MinWid exch def       % MinWidth
  189.      /MaxWid exch def       % MaxWidth
  190.      /MinSpc exch def       % MinSpace
  191.      /MaxSpc exch def       % MaxSpace
  192.      /Ht exch def              % y dimension
  193.      /Wid exch def             % x dimension
  194.      /CenY exch def         % CentY
  195.      /CenX exch def     % CentX
  196.  
  197.       eoclip
  198.       newpath
  199.  
  200.       /RndMax 2147483647 def
  201.       /SpcRange MaxSpc MinSpc sub def
  202.       /WidRange MaxWid MinWid sub def
  203.       /GrayRange FSMax FSMin sub def
  204.       /RD {
  205.         rand RndMax div 100 mul round 100 div
  206.           } bind def    % Round to 2 places
  207.  
  208.       CenX CenY translate       % centre of bound
  209.       Rot rotate                % rotate system
  210.  
  211.       % Make Background box
  212.       Wid 2 div neg Ht 2 div neg moveto
  213.       0 Ht rlineto
  214.       Wid 0 rlineto
  215.       0 Ht neg rlineto
  216.       closepath
  217.       BackS setgray
  218.       fill
  219.  
  220.       /Dist Ht 2 div Amp MaxSpc add add neg def % absolute bottom of Bbox
  221.     % /Minimum Cyc 2 div def            % Location of pt's 2 & 4
  222.       /Left Wid 2 div neg def                   % left side of Bbox
  223.  
  224.       { /Dist RD SpcRange mul MinSpc add Dist add def
  225.           Left Dist moveto
  226.           RD WidRange mul MinWid add setlinewidth  % do random linewidth
  227.       RD GrayRange mul FSMin add setgray       % do random Gray
  228.         /Minimum RD Cyc mul 2 div def
  229.  
  230.  
  231.         /Count 0 def               % track current location of waves
  232.  
  233.         {
  234.             Left Count add Minimum add
  235.             dup
  236.             MaxSpc RD Amp mul mul Dist add
  237.             exch
  238.             MaxSpc RD Amp mul mul neg Dist add
  239.             Left Count add Cyc add
  240.             Dist
  241.  
  242.             curveto
  243.  
  244.             /Count Count Cyc add def    %add wavelength to counter
  245.  
  246.             Wid Count resX div 300 mul lt %check if Bbox filled
  247.                {exit} if
  248.         } loop
  249.  
  250.       stroke
  251.         Ht 2 div Amp resY div 300 mul MaxSpc add add Dist lt {exit} if
  252.       } loop
  253.  
  254. } bind def
  255. %GSEndFill
  256.  
  257.  
  258.  
  259. %GSFill:Fount1,Fountain-A 1
  260. %@Param:Density,integer,50
  261. %@Param:Max Length,points,100
  262. %@Param:Min Length,points,2
  263. %@Param:Max Line Width,points,100
  264. %@Param:Min Line Width,points,2
  265. %@Param:Background Shade,percent,0,100,0
  266. %@Param:Start Shade,percent,0,100,100
  267. %@Param:End Shade,percent,0,100,10
  268. %@Param:Angle,angle,-360,360,0
  269. %@Param:Offset,angle,-180,180,90
  270. %@Param:Random Seed,real,0,1,0
  271.  
  272.  
  273. %!    Fount1
  274. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  275. %!    Rev 1 - Jan. 19
  276. %!    Rev 2 - June 17, 1992 -changed by Arno Krautter to account for
  277. %!            printer resolution [resX, resY] because Windows outputs
  278. %!            resolution dependent coords
  279.  
  280.  
  281. /Fount1
  282.    {
  283.      srand                  % RandomSeed
  284.      /Off exch def      % Rotate
  285.      /Rot exch def      % Offset
  286.      1.0 exch sub /End exch def              % ForeShadeMin
  287.      1.0 exch sub /Start exch def        % ForeShadeMax
  288.      1.0 exch sub /BackS exch def        % Backshade
  289.      /MinWid exch def       % MinWidth
  290.      /MaxWid exch def       % MaxWidth
  291.      /MinLen exch def       % MinSpace
  292.      /MaxLen exch def       % MaxSpace
  293.      /Den exch def      % Frequency
  294.      /Ht exch def              % y dimension
  295.      /Wid exch def             % x dimension
  296.      /CenY exch def         % CentY
  297.      /CenX exch def     % CentX
  298.  
  299.       eoclip
  300.       newpath
  301.  
  302.       /RndMax 2147483647 def
  303.       /LenRange MaxLen MinLen sub abs def
  304.       /WidRange MaxWid MinWid sub abs def
  305.       /Max MaxLen MaxWid gt {MaxLen}{MaxWid} ifelse def
  306.       /NewWid Max Wid add def
  307.       /NewHt Max Ht add def
  308.       /RD {
  309.        rand RndMax div 100 mul round 100 div
  310.         } bind def  % Round to 2 places
  311.  
  312.       /string256 256 string def
  313.       /Ffill {
  314.         1 index sub
  315.         exch 255 mul
  316.         0 1 255 { string256 exch dup
  317.               4 index mul
  318.               3 index add cvi
  319.               put
  320.         } for
  321.         pop pop
  322.         1 256 8 [1 0 0 256 0 0] {string256} image
  323.       } bind def
  324.  
  325.       CenX CenY translate       % centre of bound
  326.  
  327.       % Make Background box
  328.       Wid 2 div neg Ht 2 div neg moveto
  329.       0 Ht rlineto
  330.       Wid 0 rlineto
  331.       0 Ht neg rlineto
  332.       closepath
  333.       BackS setgray
  334.       fill
  335.  
  336.       Ht Wid mul Den mul resX div resY div cvi
  337.  
  338.         {
  339.         gsave
  340.                 RD NewWid mul Wid 2 div sub
  341.                 RD NewHt mul Ht 2 div sub
  342.             translate
  343.             RD Off 2 mul mul Off sub Rot add
  344.             rotate
  345.  
  346.             RD LenRange mul MinLen add
  347.             RD WidRange mul MinWid add
  348.             scale
  349.             Start End Ffill
  350.         grestore
  351.         }
  352.         repeat
  353.  
  354. } bind def
  355. %GSEndFill
  356.  
  357. %GSFill:Fount2,Fountain-A 2
  358. %@Param:Density,integer,20
  359. %@Param:Max Length,points,200
  360. %@Param:Min Length,points,200
  361. %@Param:Max Line Width,points,20
  362. %@Param:Min Line Width,points,14
  363. %@Param:Background Shade,percent,0,100,100
  364. %@Param:Start Shade,percent,0,100,100
  365. %@Param:End Shade,percent,0,100,0
  366. %@Param:Angle,angle,-360,360,330
  367. %@Param:Offset,angle,-180,180,0
  368. %@Param:RandomSeed,real,0,1,0
  369.  
  370.  
  371. %!    Fount2
  372. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  373. %!    Rev 1 - Jan. 19
  374. %!    Rev 2 - June 17, 1992 -changed by Arno Krautter to account for
  375. %!            printer resolution [resX, resY] because Windows outputs
  376. %!            resolution dependent coords
  377. %!
  378.  
  379. /Fount2
  380.    {
  381.      srand                  % RandomSeed
  382.      /Off exch def      % Rotate
  383.      /Rot exch def      % Offset
  384.      1.0 exch sub /End exch def              % ForeShadeMin
  385.      1.0 exch sub /Start exch def        % ForeShadeMax
  386.      1.0 exch sub /BackS exch def        % Backshade
  387.      /MinWid exch def       % MinWidth
  388.      /MaxWid exch def       % MaxWidth
  389.      /MinLen exch def       % MinSpace
  390.      /MaxLen exch def       % MaxSpace
  391.      /Den exch def      % Frequency
  392.      /Ht exch def              % y dimension
  393.      /Wid exch def             % x dimension
  394.      /CenY exch def         % CentY
  395.      /CenX exch def     % CentX
  396.  
  397.       eoclip
  398.       newpath
  399.  
  400.       /RndMax 2147483647 def
  401.       /LenRange MaxLen MinLen sub abs def
  402.       /WidRange MaxWid MinWid sub abs def
  403.       /Max MaxLen MaxWid gt {MaxLen}{MaxWid} ifelse def
  404.       /NewWid Max Wid add def
  405.       /NewHt Max Ht add def
  406.       /RD {
  407.        rand RndMax div 100 mul round 100 div
  408.         } bind def  % Round to 2 places
  409.  
  410.       /string256 256 string def
  411.       /Ffill {
  412.         1 index sub
  413.         exch 255 mul
  414.         0 1 255 { string256 exch dup
  415.               4 index mul
  416.               3 index add cvi
  417.               put
  418.         } for
  419.         pop pop
  420.         1 256 8 [1 0 0 256 0 0] {string256} image
  421.       } bind def
  422.  
  423.       CenX CenY translate       % centre of bound
  424.  
  425.       % Make Background box
  426.       Wid 2 div neg Ht 2 div neg moveto
  427.       0 Ht rlineto
  428.       Wid 0 rlineto
  429.       0 Ht neg rlineto
  430.       closepath
  431.       BackS setgray
  432.       fill
  433.  
  434.       Ht Wid mul Den mul resX div resY div cvi
  435.  
  436.         {
  437.         gsave
  438.                 RD NewWid mul Wid 2 div sub
  439.                 RD NewHt mul Ht 2 div sub
  440.             translate
  441.             RD Off 2 mul mul Off sub Rot add
  442.             rotate
  443.  
  444.             RD LenRange mul MinLen add
  445.             RD WidRange mul MinWid add
  446.             scale
  447.             Start End Ffill
  448.         grestore
  449.         }
  450.         repeat
  451.  
  452. } bind def
  453. %GSEndFill
  454.  
  455.  
  456. %GSFill:Fountb1,Fountain-B 1
  457. %@Param:Density,integer,50
  458. %@Param:Max Length,points,36
  459. %@Param:Min Length,points,36
  460. %@Param:Max Line Width,points,36
  461. %@Param:Min Line Width,points,36
  462. %@Param:Background Shade,percent,100
  463. %@Param:Start Shade,percent,100
  464. %@Param:End Shade,percent,0
  465. %@Param:Angle,angle,-360,360,0
  466. %@Param:Offset,angle,-180,180,90
  467. %@Param:RandomSeed,real,0,1,0
  468.  
  469. %!    Fount2
  470. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  471. %!    Rev 1 - Jan. 19
  472. %!    Rev 2 - June 17, 1992 -changed by Arno Krautter to account for
  473. %!            printer resolution [resX, resY] because Windows outputs
  474. %!            resolution dependent coords
  475. %!
  476.  
  477.  
  478. %% Fountb1 Proc.
  479. /Fountb1
  480.    {
  481.      srand                  % RandomSeed
  482.      /Off exch def      % Rotate
  483.      /Rot exch def      % Offset
  484.      1.0 exch sub /End exch def              % ForeShadeMin
  485.      1.0 exch sub /Start exch def        % ForeShadeMax
  486.      1.0 exch sub /BackS exch def        % Backshade
  487.      /MinWid exch def       % MinWidth
  488.      /MaxWid exch def       % MaxWidth
  489.      /MinLen exch def       % MinSpace
  490.      /MaxLen exch def       % MaxSpace
  491.      /Den exch def      % Frequency
  492.      /Ht exch def              % y dimension
  493.      /Wid exch def             % x dimension
  494.      /CenY exch def         % CentY
  495.      /CenX exch def     % CentX
  496.  
  497.       eoclip
  498.       newpath
  499.  
  500.       /RndMax 2147483647 def
  501.       /LenRange MaxLen MinLen sub abs def
  502.       /WidRange MaxWid MinWid sub abs def
  503.       /Max MaxLen MaxWid gt {MaxLen}{MaxWid} ifelse def
  504.       /NewWid Max Wid add def
  505.       /NewHt Max Ht add def
  506.       /RD {
  507.        rand RndMax div 100 mul round 100 div
  508.         } bind def  % Round to 2 places
  509.  
  510.       /string256 256 string def
  511.       /Ffill {
  512.         1 index sub
  513.         exch 255 mul
  514.         0 1 255 { string256 exch dup
  515.               4 index mul
  516.               3 index add cvi
  517.               put
  518.         } for
  519.         pop pop
  520.         1 256 8 [1 0 0 256 0 0] {string256} image
  521.       } bind def
  522.  
  523.       /Tri {
  524.  
  525.     /HtTri exch def
  526.     /WidTri exch def
  527.  
  528.     newpath
  529.     0 0 moveto
  530.     WidTri 2 div HtTri rlineto
  531.     WidTri 2 div HtTri neg rlineto
  532.     closepath
  533.         clip
  534.       } bind def
  535.  
  536.       CenX CenY translate       % centre of bound
  537.  
  538.       % Make Background box
  539.       Wid 2 div neg Ht 2 div neg moveto
  540.       0 Ht rlineto
  541.       Wid 0 rlineto
  542.       0 Ht neg rlineto
  543.       closepath
  544.       BackS setgray
  545.       fill
  546.  
  547.       Ht Wid mul Den mul resX div resY div cvi
  548.       {
  549.        gsave
  550.             RD NewWid mul NewWid 2 div sub
  551.             RD NewHt mul NewHt 2 div sub
  552.         translate
  553.         RD Off 2 mul mul Off sub Rot add
  554.         rotate
  555.  
  556.         RD LenRange mul MinLen add
  557.         RD WidRange mul MinWid add
  558.         2 copy
  559.         Tri
  560.         scale
  561.         Start End Ffill
  562.       grestore
  563.       } repeat
  564.  
  565. } bind def
  566.  
  567. %GSEndFill
  568.  
  569.  
  570.  
  571. %GSFill:Fountb2,Fountain-B 2
  572. %@Param:Density,integer,50
  573. %@Param:Max Length,points,10
  574. %@Param:Min Length,points,2
  575. %@Param:Max Line Width,points,350
  576. %@Param:Min Line Width,points,50
  577. %@Param:Background Shade,percent,100
  578. %@Param:Start Shade,percent,0
  579. %@Param:End Shade,percent,100
  580. %@Param:Angle,angle,-360,360,180
  581. %@Param:Offset,angle,-180,180,0
  582. %@Param:RandomSeed,real,0,1,0
  583.  
  584. %!    Fountb2
  585. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  586. %!    Rev 1 - Jan. 19
  587. %!    Rev 2 - June 17, 1992 -changed by Arno Krautter to account for
  588. %!            printer resolution [resX, resY] because Windows outputs
  589. %!            resolution dependent coords
  590.  
  591.  
  592. %% Fountb2 Proc.
  593. /Fountb2
  594.    {
  595.      srand                  % RandomSeed
  596.      /Off exch def      % Rotate
  597.      /Rot exch def      % Offset
  598.      1.0 exch sub /End exch def              % ForeShadeMin
  599.      1.0 exch sub /Start exch def        % ForeShadeMax
  600.      1.0 exch sub /BackS exch def        % Backshade
  601.      /MinWid exch def       % MinWidth
  602.      /MaxWid exch def       % MaxWidth
  603.      /MinLen exch def       % MinSpace
  604.      /MaxLen exch def       % MaxSpace
  605.      /Den exch def      % Frequency
  606.      /Ht exch def              % y dimension
  607.      /Wid exch def             % x dimension
  608.      /CenY exch def         % CentY
  609.      /CenX exch def     % CentX
  610.  
  611.       eoclip
  612.       newpath
  613.  
  614.       /RndMax 2147483647 def
  615.       /LenRange MaxLen MinLen sub abs def
  616.       /WidRange MaxWid MinWid sub abs def
  617.       /Max MaxLen MaxWid gt {MaxLen}{MaxWid} ifelse def
  618.       /NewWid Max Wid add def
  619.       /NewHt Max Ht add def
  620.       /RD {
  621.        rand RndMax div 100 mul round 100 div
  622.         } bind def  % Round to 2 places
  623.  
  624.       /string256 256 string def
  625.       /Ffill {
  626.         1 index sub
  627.         exch 255 mul
  628.         0 1 255 { string256 exch dup
  629.               4 index mul
  630.               3 index add cvi
  631.               put
  632.         } for
  633.         pop pop
  634.         1 256 8 [1 0 0 256 0 0] {string256} image
  635.       } bind def
  636.  
  637.       /Tri {
  638.  
  639.     /HtTri exch def
  640.     /WidTri exch def
  641.  
  642.     newpath
  643.     0 0 moveto
  644.     WidTri 2 div HtTri rlineto
  645.     WidTri 2 div HtTri neg rlineto
  646.     closepath
  647.         clip
  648.       } bind def
  649.  
  650.       CenX CenY translate       % centre of bound
  651.  
  652.       % Make Background box
  653.       Wid 2 div neg Ht 2 div neg moveto
  654.       0 Ht rlineto
  655.       Wid 0 rlineto
  656.       0 Ht neg rlineto
  657.       closepath
  658.       BackS setgray
  659.       fill
  660.  
  661.       Ht Wid mul Den mul resX div resY div cvi
  662.       {
  663.        gsave
  664.             RD NewWid mul NewWid 2 div sub
  665.             RD NewHt mul NewHt 2 div sub
  666.         translate
  667.         RD Off 2 mul mul Off sub Rot add
  668.         rotate
  669.  
  670.         RD LenRange mul MinLen add
  671.         RD WidRange mul MinWid add
  672.         2 copy
  673.         Tri
  674.         scale
  675.         Start End Ffill
  676.       grestore
  677.       } repeat
  678.  
  679. } bind def
  680.  
  681. %GSEndFill
  682.  
  683.  
  684.  
  685. %GSFill:Hatch,Hatch 1
  686. %@Param:Max Space,points,10
  687. %@Param:Min Space,points,1
  688. %@Param:Max Line Width,points,.6
  689. %@Param:Min Line Width,points,.24
  690. %@Param:Angle,angle,-360,360,0
  691. %@Param:Background Shade,percent,0,100,0
  692. %@Param:Foregrnd Shade Max,percent,0,100,100
  693. %@Param:Foregrnd Shade Min,percent,0,100,0
  694. %@Param:Offset,angle,-180,180,2
  695. %@Param:RandomSeed,real,0,1,0
  696.  
  697. %!    Hatch1
  698. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  699. %!    Rev 1 - Jan. 13
  700.  
  701. /Hatch
  702.    {
  703.      srand                  % RandomSeed
  704.      /Off exch def      % Offset
  705.      1.0 exch sub /FSMin exch def            % ForeShadeMin
  706.      1.0 exch sub /FSMax exch def        % ForeShadeMax
  707.      1.0 exch sub /BackS exch def        % Backshade
  708.      /Rot exch def      % Angle
  709.      /MinWid exch def       % MinWidth
  710.      /MaxWid exch def       % MaxWidth
  711.      /MinSpc exch def       % MinSpace
  712.      /MaxSpc exch def       % MaxSpace
  713.      /Ht exch def              % y dimension
  714.      /Wid exch def             % x dimension
  715.      /CenY exch def         % CentY
  716.      /CenX exch def     % CentX
  717.  
  718.       eoclip
  719.       newpath
  720.  
  721.       /RndMax 2147483647 def
  722.       /SpcRange MaxSpc MinSpc sub def
  723.       /WidRange MaxWid MinWid sub def
  724.       /GrayRange FSMax FSMin sub def
  725.       /RD {
  726.        rand RndMax div 100 mul round 100 div
  727.         } bind def  % Round to 2 places
  728.  
  729.       CenX CenY translate       % centre of bound
  730.       Rot rotate                % rotate system
  731.  
  732.       % Make Background box
  733.       Wid 2 div neg Ht 2 div neg moveto
  734.       0 Ht rlineto
  735.       Wid 0 rlineto
  736.       0 Ht neg rlineto
  737.       closepath
  738.       BackS setgray
  739.       fill
  740.  
  741.       /Dist Ht 2 div neg def
  742.  
  743.       { /Dist RD SpcRange mul MinSpc add Dist add def
  744.         RD WidRange mul MinWid add setlinewidth
  745.     RD GrayRange mul FSMin add setgray
  746.     gsave
  747.         RD Off 2 mul mul Off sub
  748.         rotate
  749.         Wid 2 div neg Dist moveto
  750.         Wid 2 div Dist lineto
  751.         stroke
  752.     grestore
  753.  
  754.     Ht 2 div Dist lt {exit} if
  755.       } loop
  756.  
  757. } bind def
  758.  
  759. %GSEndFill
  760.  
  761.  
  762.  
  763.  
  764. %GSFill:Hatch2,Hatch 2
  765. %@Param:Max Space,points,6
  766. %@Param:Min Space,points,1
  767. %@Param:Max Line Width,points,.6
  768. %@Param:Min Line Width,points,.24
  769. %@Param:Angle,angle,-360,360,0
  770. %@Param:Background Shade,percent,0,100,10
  771. %@Param:Foregrnd Shade Max,percent,0,100,100
  772. %@Param:Foregrnd Shade Min,percent,0,100,0
  773. %@Param:Offset,angle,-180,180,90
  774. %@Param:RandomSeed,real,0,1,0
  775.  
  776. %!    Hatch2
  777. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  778. %!    Rev 1 - Jan. 13
  779.  
  780. /Hatch2
  781.    {
  782.      srand                  % RandomSeed
  783.      /Off exch def      % Offset
  784.      1.0 exch sub /FSMin exch def            % ForeShadeMin
  785.      1.0 exch sub /FSMax exch def        % ForeShadeMax
  786.      1.0 exch sub /BackS exch def        % Backshade
  787.      /Rot exch def      % Angle
  788.      /MinWid exch def       % MinWidth
  789.      /MaxWid exch def       % MaxWidth
  790.      /MinSpc exch def       % MinSpace
  791.      /MaxSpc exch def       % MaxSpace
  792.      /Ht exch def              % y dimension
  793.      /Wid exch def             % x dimension
  794.      /CenY exch def         % CentY
  795.      /CenX exch def     % CentX
  796.  
  797.       eoclip
  798.       newpath
  799.  
  800.       /RndMax 2147483647 def
  801.       /SpcRange MaxSpc MinSpc sub def
  802.       /WidRange MaxWid MinWid sub def
  803.       /GrayRange FSMax FSMin sub def
  804.       /RD {
  805.        rand RndMax div 100 mul round 100 div
  806.         } bind def  % Round to 2 places
  807.  
  808.       CenX CenY translate       % centre of bound
  809.       Rot rotate                % rotate system
  810.  
  811.       % Make Background box
  812.       Wid 2 div neg Ht 2 div neg moveto
  813.       0 Ht rlineto
  814.       Wid 0 rlineto
  815.       0 Ht neg rlineto
  816.       closepath
  817.       BackS setgray
  818.       fill
  819.  
  820.       /Dist Ht 2 div neg def
  821.  
  822.       { /Dist RD SpcRange mul MinSpc add Dist add def
  823.         RD WidRange mul MinWid add setlinewidth
  824.     RD GrayRange mul FSMin add setgray
  825.     gsave
  826.         RD Off 2 mul mul Off sub
  827.         rotate
  828.         Wid 2 div neg Dist moveto
  829.         Wid 2 div Dist lineto
  830.         stroke
  831.     grestore
  832.  
  833.     Ht 2 div Dist lt {exit} if
  834.       } loop
  835.  
  836. } bind def
  837.  
  838. %GSEndFill
  839.  
  840.  
  841.  
  842.  
  843. %GSFill:Horizon,Horizon 1
  844. %@Param:Number of Lines,integer,60
  845. %@Param:Line Width,points,3
  846. %@Param:Background Shade,percent,0,100,15
  847. %@Param:Line Shade,percent,0,100,100
  848. %@Param:Angle,angle,-360,360,180
  849.  
  850.  
  851. %!    Horizon1.ps
  852. %!    Modified by Mark Jaremko TKK Enterprised, January 1991
  853. %!    Rev 2 - Jan. 13
  854.  
  855. /Horizon
  856.    {
  857.      /Rot exch def         % degree of rotation
  858.      1.0 exch sub /LS exch def              % shade of line
  859.      1.0 exch sub /GS exch def              % shade of gray
  860.      /FL exch def              % linewidth in foreground
  861.      /Num exch def             % number of lines in plain
  862.      /Ht exch def              % y dimension
  863.      /Wid exch def             % x dimension
  864.      /CenY exch def            % Y location of bounding box
  865.      /CenX exch def            % Y location of bounding box
  866.  
  867.       eoclip
  868.       newpath
  869.  
  870.       CenX CenY translate       % calc centre of bound
  871.       Rot rotate                % rotate system
  872.       Wid 2 div neg Ht 2 div neg translate
  873.  
  874.       0 0 moveto
  875.       0 Ht rlineto
  876.       Wid 0 rlineto
  877.       0 Ht neg rlineto
  878.       closepath
  879.       GS setgray
  880.       fill
  881.  
  882.       LS setgray                % shade of lines lines
  883.       1 10 Num div 10           % for loop (1 to 10)
  884.        {dup                     % save a copy of loopcounter
  885.         FL exch div     % make line thinner as it recedes
  886.         setlinewidth
  887.         log Ht mul              % log(loopcounter) times y dimension
  888.         0 exch moveto
  889.         Wid 0 rlineto
  890.         stroke                  % draw the line
  891.        } for
  892.    } def                        % end horizon
  893.  
  894. %GSEndFill
  895.  
  896.  
  897.  
  898. %GSFill:Horizon,Horizon 2
  899. %@Param:Number of Lines,integer,30
  900. %@Param:Line Width,points,15
  901. %@Param:Background Shade,percent,0,100,50
  902. %@Param:Line Shade,percent,0,100,100
  903. %@Param:Angle,angle,-360,0,-180
  904.  
  905.  
  906. %!    Horizon1.ps
  907. %!    Modified by Mark Jaremko TKK Enterprised, January 1991
  908. %!    Rev 2 - Jan. 13
  909.  
  910. /Horizon
  911.    {
  912.      /Rot exch def         % degree of rotation
  913.      1.0 exch sub /LS exch def              % shade of line
  914.      1.0 exch sub /GS exch def              % shade of gray
  915.      /FL exch def              % linewidth in foreground
  916.      /Num exch def             % number of lines in plain
  917.      /Ht exch def              % y dimension
  918.      /Wid exch def             % x dimension
  919.      /CenY exch def            % Y location of bounding box
  920.      /CenX exch def            % Y location of bounding box
  921.  
  922.       eoclip
  923.       newpath
  924.  
  925.       CenX CenY translate       % calc centre of bound
  926.       Rot rotate                % rotate system
  927.       Wid 2 div neg Ht 2 div neg translate
  928.  
  929.       0 0 moveto
  930.       0 Ht rlineto
  931.       Wid 0 rlineto
  932.       0 Ht neg rlineto
  933.       closepath
  934.       GS setgray
  935.       fill
  936.  
  937.       LS setgray                % shade of lines lines
  938.       1 10 Num div 10           % for loop (1 to 10)
  939.        {dup                     % save a copy of loopcounter
  940.         FL exch div     % make line thinner as it recedes
  941.         setlinewidth
  942.         log Ht mul              % log(loopcounter) times y dimension
  943.         0 exch moveto
  944.         Wid 0 rlineto
  945.         stroke                  % draw the line
  946.        } for
  947.    } def                        % end horizon
  948.  
  949. %GSEndFill
  950.  
  951.  
  952.  
  953. %GSFill:Lines,Lines 1
  954. %@Param:Density,integer,45
  955. %@Param:Max Length,points,75
  956. %@Param:Min Length,points,1
  957. %@Param:Max Line Width,points,4.24
  958. %@Param:Min Line Width,points,.24
  959. %@Param:Background Shade,percent,0,100,10
  960. %@Param:Foregrnd Shade Max,percent,0,100,0
  961. %@Param:Foregrnd Shade Min,percent,0,100,100
  962. %@Param:Angle,angle,-360,360,0
  963. %@Param:Offset,angle,-180,180,90
  964. %@Param:RandomSeed,real,0,0
  965.  
  966. %!    Lines
  967. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  968. %!    Rev 1 - Jan. 17
  969. %!    Rev 2 - June 17, 1992 -changed by Arno Krautter to account for
  970. %!            printer resolution [resX, resY] because Windows outputs
  971. %!            resolution dependent coords
  972. %!
  973.  
  974. %% Lines Proc.
  975.  
  976. /Lines
  977.    {
  978.      srand                  % RandomSeed
  979.      /Off exch def      % Rotate
  980.      /Rot exch def      % Offset
  981.      1.0 exch sub /FSMin exch def            % ForeShadeMin
  982.      1.0 exch sub /FSMax exch def        % ForeShadeMax
  983.      1.0 exch sub /BackS exch def        % Backshade
  984.      /MinWid exch def       % MinWidth
  985.      /MaxWid exch def       % MaxWidth
  986.      /MinLen exch def       % MinSpace
  987.      /MaxLen exch def       % MaxSpace
  988.      /Den exch def      % Frequency
  989.      /Ht exch def              % y dimension
  990.      /Wid exch def             % x dimension
  991.      /CenY exch def         % CentY
  992.      /CenX exch def     % CentX
  993.  
  994.       eoclip
  995.       newpath
  996.  
  997.       /RndMax 2147483647 def
  998.       /LenRange MaxLen MinLen sub abs def
  999.       /WidRange MaxWid MinWid sub abs def
  1000.       /GrayRange FSMax FSMin sub abs def
  1001.       /RD {
  1002.        rand RndMax div 100 mul round 100 div
  1003.         } bind def  % Round to 2 places
  1004.  
  1005.       CenX CenY translate       % centre of bound
  1006.       Rot rotate
  1007.  
  1008.       % Make Background box
  1009.       Wid 2 div neg Ht 2 div neg moveto
  1010.       0 Ht rlineto
  1011.       Wid 0 rlineto
  1012.       0 Ht neg rlineto
  1013.       closepath
  1014.       BackS setgray
  1015.       fill
  1016.  
  1017.       Ht Wid mul Den mul resX div resY div cvi
  1018.  
  1019.       { RD Wid mul Wid 2 div sub
  1020.         RD Ht mul Ht 2 div sub
  1021.     moveto
  1022.     gsave
  1023.         RD Off 2 mul mul Off sub
  1024.         rotate
  1025.  
  1026.         RD LenRange mul MinLen add
  1027.         0
  1028.         rlineto
  1029.  
  1030.         RD WidRange mul MinWid add setlinewidth
  1031.         RD GrayRange mul FSMin add setgray
  1032.         stroke
  1033.     grestore
  1034.       }
  1035.     repeat
  1036.  
  1037. } bind def
  1038.  
  1039. %GSEndFill
  1040.  
  1041.  
  1042.  
  1043. %GSFill:Lines2,Lines 2
  1044. %@Param:Density,integer,50
  1045. %@Param:Max Length,points,75
  1046. %@Param:Min Length,points,50
  1047. %@Param:Max Line Width,points,1.24
  1048. %@Param:Min Line Width,points,.24
  1049. %@Param:Background Shade,percent,0,100,100
  1050. %@Param:Foregrnd Shade Max,percent,0,100,0
  1051. %@Param:Foregrnd Shade Min,percent,0,100,100
  1052. %@Param:Angle,angle,-360,360,90
  1053. %@Param:Offset,angle,-180,180,0
  1054. %@Param:RandomSeed,real,0,0
  1055.  
  1056. %!    Lines
  1057. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  1058. %!    Rev 1 - Jan. 17
  1059. %!    Rev 2 - June 17, 1992 -changed by Arno Krautter to account for
  1060. %!            printer resolution [resX, resY] because Windows outputs
  1061. %!            resolution dependent coords
  1062. %!
  1063.  
  1064. %% Lines Proc.
  1065.  
  1066. /Lines2
  1067.    {
  1068.      srand                  % RandomSeed
  1069.      /Off exch def      % Rotate
  1070.      /Rot exch def      % Offset
  1071.      1.0 exch sub /FSMin exch def            % ForeShadeMin
  1072.      1.0 exch sub /FSMax exch def        % ForeShadeMax
  1073.      1.0 exch sub /BackS exch def        % Backshade
  1074.      /MinWid exch def       % MinWidth
  1075.      /MaxWid exch def       % MaxWidth
  1076.      /MinLen exch def       % MinSpace
  1077.      /MaxLen exch def       % MaxSpace
  1078.      /Den exch def      % Frequency
  1079.      /Ht exch def              % y dimension
  1080.      /Wid exch def             % x dimension
  1081.      /CenY exch def         % CentY
  1082.      /CenX exch def     % CentX
  1083.  
  1084.       eoclip
  1085.       newpath
  1086.  
  1087.       /RndMax 2147483647 def
  1088.       /LenRange MaxLen MinLen sub abs def
  1089.       /WidRange MaxWid MinWid sub abs def
  1090.       /GrayRange FSMax FSMin sub abs def
  1091.       /RD {
  1092.        rand RndMax div 100 mul round 100 div
  1093.         } bind def  % Round to 2 places
  1094.  
  1095.       CenX CenY translate       % centre of bound
  1096.       Rot rotate
  1097.  
  1098.       % Make Background box
  1099.       Wid 2 div neg Ht 2 div neg moveto
  1100.       0 Ht rlineto
  1101.       Wid 0 rlineto
  1102.       0 Ht neg rlineto
  1103.       closepath
  1104.       BackS setgray
  1105.       fill
  1106.  
  1107.       Ht Wid mul Den mul resX div resY div cvi
  1108.  
  1109.       { RD Wid mul Wid 2 div sub
  1110.         RD Ht mul Ht 2 div sub
  1111.     moveto
  1112.     gsave
  1113.         RD Off 2 mul mul Off sub
  1114.         rotate
  1115.  
  1116.         RD LenRange mul MinLen add
  1117.         0
  1118.         rlineto
  1119.  
  1120.         RD WidRange mul MinWid add setlinewidth
  1121.         RD GrayRange mul FSMin add setgray
  1122.         stroke
  1123.     grestore
  1124.       }
  1125.     repeat
  1126.  
  1127. } bind def
  1128.  
  1129. %GSEndFill
  1130.  
  1131.  
  1132.  
  1133. %GSFill:Sun,Sun-A 1
  1134. %@Param:X Distance,points,0
  1135. %@Param:Y Distance,points,0
  1136. %@Param:Degrees,angle,-360,360,4
  1137. %@Param:Sun Radius,points,20
  1138. %@Param:Sun Fill Shade,percent,0,100,50
  1139. %@Param:Ray Width,points,.25
  1140. %@Param:Background Shade,percent,0,100,0
  1141. %@Param:Foreground Shade,percent,0,100,100
  1142. %@Param:Cycles,integer,100
  1143. %@Param:Amplitude,integer,10
  1144.  
  1145. %!    Sun1-2
  1146. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  1147. %!    Rev 2 - Jan. 14
  1148. %!    Same as original but adds wavey lines to rays
  1149. %!    Rev 3 - June 17, 1992 -changed by Arno Krautter to account for
  1150. %!            printer resolution [resX, resY] because Windows outputs
  1151. %!            resolution dependent coords
  1152.  
  1153. /Sun
  1154.    {
  1155.      resX mul 300 div /Amp exch def      % Amplitude
  1156.      resX mul 300 div /Cyc exch def      % Cycles
  1157.      1.0 exch sub /FS exch def               % ForeShade
  1158.      1.0 exch sub /BackS exch def        % Backshade
  1159.      /RayWid exch def       % RayWidth
  1160.      1.0 exch sub /SunShad exch def      % SunFillShade
  1161.      /SunRad exch def       % SunRadius
  1162.      /Degrees exch def      % Degrees
  1163.      /dy exch def       % YDist
  1164.      /dx exch def       % XDist
  1165.      /Ht exch def       % Height
  1166.      /Wid exch def          % Width
  1167.      /CenY exch def         % CentY
  1168.      /CenX exch def     % CentX
  1169.  
  1170.       eoclip
  1171.       newpath
  1172.  
  1173.       CenX CenY translate       % centre of bound
  1174.  
  1175.       % Make Background box
  1176.       Wid 2 div neg Ht 2 div neg moveto
  1177.       0 Ht rlineto
  1178.       Wid 0 rlineto
  1179.       0 Ht neg rlineto
  1180.       closepath
  1181.       BackS setgray
  1182.       fill
  1183.  
  1184.       /Dist Wid Ht ge {Wid}{Ht} ifelse def
  1185.       /Ofset dx abs dy abs ge {dx}{dy} ifelse abs def
  1186.  
  1187.       dx dy translate
  1188.       RayWid setlinewidth
  1189.       FS setgray
  1190.  
  1191.       0 Degrees 360
  1192.       { gsave
  1193.             rotate
  1194.             0 0 moveto
  1195.  
  1196.         Cyc 0 ne
  1197.         {
  1198.             /Minimum Cyc 2 div def
  1199.                 /Count 0 def
  1200.  
  1201.             {
  1202.                     Count Minimum add
  1203.                     dup
  1204.                     Amp
  1205.                     exch
  1206.                 Amp neg
  1207.                 Count Cyc add
  1208.                 0
  1209.  
  1210.                 curveto
  1211.  
  1212.                 /Count Count Cyc add def
  1213.      % This is the big bottle neck
  1214.                 Dist Ofset add Count lt
  1215.                         {exit} if
  1216.             } loop
  1217.  
  1218.         }
  1219.         {
  1220.             Wid Ht add 0 rlineto
  1221.         }
  1222.         ifelse
  1223.  
  1224.         stroke
  1225.         grestore
  1226.       }
  1227.       for
  1228.  
  1229.       SunRad 0 ne {
  1230.             0 0 SunRad 0 360 arc
  1231.             gsave
  1232.                 SunShad setgray
  1233.                 fill
  1234.             grestore
  1235.             stroke
  1236.           } if
  1237.  
  1238. } bind def
  1239.  
  1240.  
  1241. %GSEndFill
  1242.  
  1243.  
  1244.  
  1245. %GSFill:Sun2,Sun-A 2
  1246. %@Param:X Distance,points,0
  1247. %@Param:Y Distance,points,0
  1248. %@Param:Degrees,angle,-360,360,3
  1249. %@Param:Sun Radius,points,0
  1250. %@Param:Sun Fill Shade,percent,0,100,25
  1251. %@Param:Ray Width,points,.24
  1252. %@Param:Background Shade,percent,0,100,10
  1253. %@Param:Foreground Shade,percent,0,100,100
  1254. %@Param:Cycles,integer,60
  1255. %@Param:Amplitude,integer,60
  1256.  
  1257. %!    Sun2-2
  1258. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  1259. %!    Rev 2 - Jan. 14
  1260. %!    Same as original but adds wavey lines to rays
  1261. %!    Rev 3 - June 17, 1992 -changed by Arno Krautter to account for
  1262. %!            printer resolution [resX, resY] because Windows outputs
  1263. %!            resolution dependent coords
  1264.  
  1265. /Sun2
  1266.    {
  1267.      resX mul 300 div /Amp exch def      % Amplitude
  1268.      resX mul 300 div /Cyc exch def      % Cycles
  1269.      1.0 exch sub /FS exch def               % ForeShade
  1270.      1.0 exch sub /BackS exch def        % Backshade
  1271.      /RayWid exch def       % RayWidth
  1272.      1.0 exch sub /SunShad exch def      % SunFillShade
  1273.      /SunRad exch def       % SunRadius
  1274.      /Degrees exch def      % Degrees
  1275.      /dy exch def       % YDist
  1276.      /dx exch def       % XDist
  1277.      /Ht exch def       % Height
  1278.      /Wid exch def          % Width
  1279.      /CenY exch def         % CentY
  1280.      /CenX exch def     % CentX
  1281.  
  1282.       eoclip
  1283.       newpath
  1284.  
  1285.       CenX CenY translate       % centre of bound
  1286.  
  1287.       % Make Background box
  1288.       Wid 2 div neg Ht 2 div neg moveto
  1289.       0 Ht rlineto
  1290.       Wid 0 rlineto
  1291.       0 Ht neg rlineto
  1292.       closepath
  1293.       BackS setgray
  1294.       fill
  1295.  
  1296.       /Dist Wid Ht ge {Wid}{Ht} ifelse def
  1297.       /Ofset dx abs dy abs ge {dx}{dy} ifelse abs def
  1298.  
  1299.       dx dy translate
  1300.       RayWid setlinewidth
  1301.       FS setgray
  1302.  
  1303.       0 Degrees 360
  1304.       { gsave
  1305.             rotate
  1306.             0 0 moveto
  1307.  
  1308.         Cyc 0 ne
  1309.         {
  1310.             /Minimum Cyc 2 div def
  1311.                 /Count 0 def
  1312.  
  1313.             {
  1314.                     Count Minimum add
  1315.                     dup
  1316.                     Amp
  1317.                     exch
  1318.                 Amp neg
  1319.                 Count Cyc add
  1320.                 0
  1321.  
  1322.                 curveto
  1323.  
  1324.                 /Count Count Cyc add def
  1325.      % This is the big bottle neck
  1326.                 Dist Ofset add Count lt
  1327.                         {exit} if
  1328.             } loop
  1329.  
  1330.         }
  1331.         {
  1332.             Wid Ht add 0 rlineto
  1333.         }
  1334.         ifelse
  1335.  
  1336.         stroke
  1337.         grestore
  1338.       }
  1339.       for
  1340.  
  1341.       SunRad 0 ne {
  1342.             0 0 SunRad 0 360 arc
  1343.             gsave
  1344.                 SunShad setgray
  1345.                 fill
  1346.             grestore
  1347.             stroke
  1348.           } if
  1349.  
  1350. } bind def
  1351.  
  1352.  
  1353. %GSEndFill
  1354.  
  1355.  
  1356.  
  1357. %GSFill:Sunb2,Sun-B 1
  1358. %@Param:X Distance,points,0
  1359. %@Param:Y Distance,points,0
  1360. %@Param:Num Groups,integer,20
  1361. %@Param:Degrees,angle,.3
  1362. %@Param:Number of Rays,integer,9
  1363. %@Param:Sun Radius,points,40
  1364. %@Param:Sun Fill Shade,percent,30
  1365. %@Param:Ray Width,points,1
  1366. %@Param:Background Shade,percent,0
  1367. %@Param:Foreground Shade,percent,100
  1368.  
  1369. %!    Sunb2
  1370. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  1371. %!    Rev 1 - Jan. 14
  1372. %!
  1373.  
  1374. /Sunb2
  1375.    {
  1376.      1.0 exch sub /FS exch def               % ForeShade
  1377.      1.0 exch sub /BackS exch def        % Backshade
  1378.      /RayWid exch def       % RayWidth
  1379.      1.0 exch sub /SunShad exch def      % SunFillShade
  1380.      /SunRad exch def       % SunRadius
  1381.      /Num exch def              % Number
  1382.      /Deg2 exch def             % Degrees2
  1383.      /NGrp exch def         % Degrees1
  1384.      /dy exch def       % YDist
  1385.      /dx exch def       % XDist
  1386.      /Ht exch def       % Height
  1387.      /Wid exch def          % Width
  1388.      /CenY exch def         % CentY
  1389.      /CenX exch def     % CentX
  1390.  
  1391.       eoclip
  1392.       newpath
  1393.  
  1394.       CenX CenY translate       % centre of bound
  1395.  
  1396.       % Make Background box
  1397.       Wid 2 div neg Ht 2 div neg moveto
  1398.       0 Ht rlineto
  1399.       Wid 0 rlineto
  1400.       0 Ht neg rlineto
  1401.       closepath
  1402.       BackS setgray
  1403.       fill
  1404.  
  1405.       dx dy translate
  1406.       RayWid setlinewidth
  1407.       FS setgray
  1408.  
  1409.       0 360 NGrp div 360
  1410.       { gsave
  1411.             rotate
  1412.             0 0 moveto
  1413.         0 Deg2 Deg2 Num mul
  1414.         {
  1415.          gsave
  1416.             rotate
  1417.             0 0 moveto
  1418.             Wid Ht add 0 rlineto
  1419.             stroke
  1420.          grestore
  1421.         } for
  1422.         grestore
  1423.       }
  1424.       for
  1425.  
  1426.       SunRad 0 ne {
  1427.             0 0 SunRad 0 360 arc
  1428.             gsave
  1429.                 SunShad setgray
  1430.                 fill
  1431.             grestore
  1432.             stroke
  1433.           } if
  1434.  
  1435. } bind def
  1436.  
  1437. %GSEndFill
  1438.  
  1439.  
  1440.  
  1441. %GSFill:Sunb3,Sun-B 2
  1442. %@Param:XDist,points,100
  1443. %@Param:YDist,points,-100
  1444. %@Param:Num Groups,integer,25
  1445. %@Param:Degrees,angle,1
  1446. %@Param:Number of Rays,integer,11
  1447. %@Param:Sun Radius,points,0
  1448. %@Param:Sun Fill Shade,percent,15
  1449. %@Param:Ray Width,points,1
  1450. %@Param:Background Shade,percent,0
  1451. %@Param:Foreground Shade,percent,100
  1452.  
  1453. %!    Sunb2
  1454. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  1455. %!    Rev 1 - Jan. 14
  1456. %!
  1457.  
  1458. /Sunb3
  1459.    {
  1460.      1.0 exch sub /FS exch def               % ForeShade
  1461.      1.0 exch sub /BackS exch def        % Backshade
  1462.      /RayWid exch def       % RayWidth
  1463.      1.0 exch sub /SunShad exch def      % SunFillShade
  1464.      /SunRad exch def       % SunRadius
  1465.      /Num exch def              % Number
  1466.      /Deg2 exch def             % Degrees2
  1467.      /NGrp exch def         % Degrees1
  1468.      /dy exch def       % YDist
  1469.      /dx exch def       % XDist
  1470.      /Ht exch def       % Height
  1471.      /Wid exch def          % Width
  1472.      /CenY exch def         % CentY
  1473.      /CenX exch def     % CentX
  1474.  
  1475.       eoclip
  1476.       newpath
  1477.  
  1478.       CenX CenY translate       % centre of bound
  1479.  
  1480.       % Make Background box
  1481.       Wid 2 div neg Ht 2 div neg moveto
  1482.       0 Ht rlineto
  1483.       Wid 0 rlineto
  1484.       0 Ht neg rlineto
  1485.       closepath
  1486.       BackS setgray
  1487.       fill
  1488.  
  1489.       dx dy translate
  1490.       RayWid setlinewidth
  1491.       FS setgray
  1492.  
  1493.       0 360 NGrp div 360
  1494.       { gsave
  1495.             rotate
  1496.             0 0 moveto
  1497.         0 Deg2 Deg2 Num mul
  1498.         {
  1499.          gsave
  1500.             rotate
  1501.             0 0 moveto
  1502.             Wid Ht add 0 rlineto
  1503.             stroke
  1504.          grestore
  1505.         } for
  1506.         grestore
  1507.       }
  1508.       for
  1509.  
  1510.       SunRad 0 ne {
  1511.             0 0 SunRad 0 360 arc
  1512.             gsave
  1513.                 SunShad setgray
  1514.                 fill
  1515.             grestore
  1516.             stroke
  1517.           } if
  1518.  
  1519. } bind def
  1520.  
  1521. %GSEndFill
  1522.  
  1523.  
  1524.  
  1525. %GSFill:Sine,Waves 1
  1526. %@Param:Max Space,points,15
  1527. %@Param:Min Space,points,5
  1528. %@Param:Max Line Width,points,4.24
  1529. %@Param:Min Line Width,points,.24
  1530. %@Param:Angle,angle,-360,360,0
  1531. %@Param:Background Shade,percent,0,100,0
  1532. %@Param:Foregrnd Shade Max,percent,0,100,100
  1533. %@Param:Foregrnd Shade Min,percent,0,100,0
  1534. %@Param:Amplitude,integer,5
  1535. %@Param:Cycles,integer,1
  1536. %@Param:Random Seed,real,0,1,0
  1537.  
  1538. %!    Sine1
  1539. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  1540. %!    Rev 1 - Jan. 13
  1541. /Sine
  1542.    {
  1543.      srand                  % RandomSeed
  1544.      /Cyc exch def      % Cycles
  1545.      /Amp exch def      % Amplitude
  1546.      1.0 exch sub /FSMin exch def            % ForeShadeMin
  1547.      1.0 exch sub /FSMax exch def        % ForeShadeMax
  1548.      1.0 exch sub /BackS exch def        % Backshade
  1549.      /Rot exch def      % Angle
  1550.      /MinWid exch def       % MinWidth
  1551.      /MaxWid exch def       % MaxWidth
  1552.      /MinSpc exch def       % MinSpace
  1553.      /MaxSpc exch def       % MaxSpace
  1554.      /Ht exch def              % y dimension
  1555.      /Wid exch def             % x dimension
  1556.      /CenY exch def         % CentY
  1557.      /CenX exch def     % CentX
  1558.  
  1559.       eoclip
  1560.       newpath
  1561.  
  1562.       /RndMax 2147483647 def
  1563.       /SpcRange MaxSpc MinSpc sub def
  1564.       /WidRange MaxWid MinWid sub def
  1565.       /GrayRange FSMax FSMin sub def
  1566.       /RD {
  1567.        rand RndMax div 100 mul round 100 div
  1568.         } bind def  % Round to 2 places
  1569.  
  1570.       CenX CenY translate       % centre of bound
  1571.       Rot rotate                % rotate system
  1572.  
  1573.       % Make Background box
  1574.       Wid 2 div neg Ht 2 div neg moveto
  1575.       0 Ht rlineto
  1576.       Wid 0 rlineto
  1577.       0 Ht neg rlineto
  1578.       closepath
  1579.       BackS setgray
  1580.       fill
  1581.  
  1582.       /Dist Ht 2 div neg def
  1583.  
  1584.       { /Dist RD SpcRange mul MinSpc add Dist add def
  1585.         Wid 2 div neg Dist moveto
  1586.         RD WidRange mul MinWid add setlinewidth
  1587.     RD GrayRange mul FSMin add setgray
  1588.  
  1589.     /Minimum Wid 4 div Cyc div def
  1590.     /Counter 0 def
  1591.     /FirstHalfWave
  1592.         { Counter 4 mul Minimum mul Minimum } def
  1593.     /SecondHalfWave
  1594.         { mul add Wid 2 div neg add } def
  1595.  
  1596.     Cyc cvi         % loop must be an integer
  1597.     {
  1598.         FirstHalfWave 2 SecondHalfWave
  1599.         dup
  1600.         MaxSpc Amp mul Dist add
  1601.  
  1602.         exch
  1603.         MaxSpc Amp mul neg Dist add
  1604.  
  1605.         FirstHalfWave 4 SecondHalfWave
  1606.         Dist
  1607.  
  1608.         curveto
  1609.  
  1610.         /Counter Counter 1 add def
  1611.     } repeat
  1612.  
  1613.     stroke
  1614.     Ht 2 div Dist lt {exit} if
  1615.       } loop
  1616.  
  1617. } bind def
  1618.  
  1619. %GSEndFill
  1620.  
  1621.  
  1622.  
  1623.  
  1624. %GSFill:Sine2,Waves 2
  1625. %@Param:Max Space,points,10
  1626. %@Param:Min Space,points,1
  1627. %@Param:Max Line Width,points,5
  1628. %@Param:Min Line Width,points,.24
  1629. %@Param:Angle,angle,-360,360,0
  1630. %@Param:Background Shade,percent,0,100,0
  1631. %@Param:Foregrnd Shade Max,percent,0,100,75
  1632. %@Param:Foregrnd Shade Min,percent,0,100,0
  1633. %@Param:Amplitude,integer,3
  1634. %@Param:Cycles,integer,5
  1635. %@Param:Random Seed,real,0,1,0
  1636.  
  1637. %!    Sine2
  1638. %!    Fill Routine by Mark Jaremko TKK Enterprises, January 1991
  1639. %!    Rev 1 - Jan. 13
  1640. /Sine2
  1641.    {
  1642.      srand                  % RandomSeed
  1643.      /Cyc exch def      % Cycles
  1644.      /Amp exch def      % Amplitude
  1645.      1.0 exch sub /FSMin exch def            % ForeShadeMin
  1646.      1.0 exch sub /FSMax exch def        % ForeShadeMax
  1647.      1.0 exch sub /BackS exch def        % Backshade
  1648.      /Rot exch def      % Angle
  1649.      /MinWid exch def       % MinWidth
  1650.      /MaxWid exch def       % MaxWidth
  1651.      /MinSpc exch def       % MinSpace
  1652.      /MaxSpc exch def       % MaxSpace
  1653.      /Ht exch def              % y dimension
  1654.      /Wid exch def             % x dimension
  1655.      /CenY exch def         % CentY
  1656.      /CenX exch def     % CentX
  1657.  
  1658.       eoclip
  1659.       newpath
  1660.  
  1661.       /RndMax 2147483647 def
  1662.       /SpcRange MaxSpc MinSpc sub def
  1663.       /WidRange MaxWid MinWid sub def
  1664.       /GrayRange FSMax FSMin sub def
  1665.       /RD {
  1666.        rand RndMax div 100 mul round 100 div
  1667.         } bind def  % Round to 2 places
  1668.  
  1669.       CenX CenY translate       % centre of bound
  1670.       Rot rotate                % rotate system
  1671.  
  1672.       % Make Background box
  1673.       Wid 2 div neg Ht 2 div neg moveto
  1674.       0 Ht rlineto
  1675.       Wid 0 rlineto
  1676.       0 Ht neg rlineto
  1677.       closepath
  1678.       BackS setgray
  1679.       fill
  1680.  
  1681.       /Dist Ht 2 div neg def
  1682.  
  1683.       { /Dist RD SpcRange mul MinSpc add Dist add def
  1684.         Wid 2 div neg Dist moveto
  1685.         RD WidRange mul MinWid add setlinewidth
  1686.     RD GrayRange mul FSMin add setgray
  1687.  
  1688.     /Minimum Wid 4 div Cyc div def
  1689.     /Counter 0 def
  1690.     /FirstHalfWave
  1691.         { Counter 4 mul Minimum mul Minimum } def
  1692.     /SecondHalfWave
  1693.         { mul add Wid 2 div neg add } def
  1694.  
  1695.     Cyc cvi         % loop must be an integer
  1696.     {
  1697.         FirstHalfWave 2 SecondHalfWave
  1698.         dup
  1699.         MaxSpc Amp mul Dist add
  1700.  
  1701.         exch
  1702.         MaxSpc Amp mul neg Dist add
  1703.  
  1704.         FirstHalfWave 4 SecondHalfWave
  1705.         Dist
  1706.  
  1707.         curveto
  1708.  
  1709.         /Counter Counter 1 add def
  1710.     } repeat
  1711.  
  1712.     stroke
  1713.     Ht 2 div Dist lt {exit} if
  1714.       } loop
  1715.  
  1716. } bind def
  1717.  
  1718. %GSEndFill
  1719.  
  1720.